<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <title>出纳</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/layui/css/layui.css">
</head>

<body>
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <div class="layui-logo layui-hide-xs layui-bg-black">出纳</div>
        </div>

        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <ul class="layui-nav layui-nav-tree">
                    <li class="layui-nav-item layui-nav-itemed">
                        <a href="javascript:;">出纳</a>
                        <dl class="layui-nav-child">
                            <dd><a onclick="turnto(-1)">新订单</a></dd>
                            <dd class="layui-this"><a onclick="turnto(0)">未审核</a></dd>
                            <dd><a onclick="turnto(1)">未支付</a></dd>
                            <dd><a onclick="turnto(2)">已完成</a></dd>
                        </dl>
                    </li>

                    <li class="layui-nav-item">
                        <a class="" href="javascript:;">管理员</a>
                        <dl class="layui-nav-child">
                            <dd><a onclick="turnto(4)">全部订单</a></dd>
                            <dd><a onclick="turnto(5)">账户</a></dd>
                            <dd><a onclick="turnto(3)">回收站</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item"><a href="">反馈</a></li>
                </ul>
            </div>
        </div>

        <div class="layui-body" id="viewDiv">
            <!-- 内容主体区域 -->

        </div>

    </div>
    <script src="/layui/layui.js"></script>
    <script>
        turnto(0); // 默认嵌套 未审核

        /* 页面嵌套：根据参数来更换局部页面的数据，数据由控制器根据路由填充 */
        function turnto(tar) {
            switch (tar) {
                case 5:
                    document.getElementById("viewDiv").innerHTML = '<object type="text/html" data="./account" width="100%" height="100%"></object>';
                    break;
                case 4:
                    document.getElementById("viewDiv").innerHTML = '<object type="text/html" data="./all" width="100%" height="100%"></object>';
                    break;
                case 3:
                    document.getElementById("viewDiv").innerHTML = '<object type="text/html" data="./trash" width="100%" height="100%"></object>';
                    break;
                case 2:
                    document.getElementById("viewDiv").innerHTML = '<object type="text/html" data="./paid" width="100%" height="100%"></object>';
                    break;
                case 1:
                    document.getElementById("viewDiv").innerHTML = '<object type="text/html" data="./unpaid" width="100%" height="100%"></object>';
                    break;
                case 0:
                    document.getElementById("viewDiv").innerHTML = '<object type="text/html" data="./uncheck" width="100%" height="100%"></object>';
                    break;
                case -1:
                    document.getElementById("viewDiv").innerHTML = '<object type="text/html" data="./newcash" width="100%" height="100%"></object>';
                    break;
                default:
                    document.getElementById("viewDiv").innerHTML = '<object type="text/html" data="./uncheck" width="100%" height="100%"></object>';
                    break;
            }
        }
    </script>
</body>

</html>